<%@ page import="bean.UserInfo" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<c:forEach items="${nums}" var="n">
    <h1>${n}</h1>
</c:forEach>

<c:out value="123123"/>
<c:if test="true">
    <h1>test 是为true</h1>
</c:if>
<c:if test="false">
    <h1>test 是为false</h1>
</c:if>
<c:out value="nums"/>

<c:choose>
    <c:when test="${nums[0] == 1}">
        <h1>第一个值为1</h1>
    </c:when>
</c:choose>
<h1>---------------------- 读取所有的用户信息并显示 ----------------------</h1>
<%
    List<UserInfo> list = (List<UserInfo>) request.getAttribute("userList");
    for (UserInfo u : list) {
%>
<div>
    姓名:<%=u.getNickname()%>> --> 账号: <%=u.getAccount()%>>
</div>
<%}%>
<c:forEach var="u" items="${userList}">
    <div>
        姓名:${u.nickname} --> 账号: ${u.account} -->
        邮箱：<c:choose>
        <c:when test="${u.email == null}">
            <a href="###">请设置邮箱</a>
        </c:when>
        <c:otherwise>${u.email}</c:otherwise>
    </c:choose>
    </div>
</c:forEach>

</body>
</html>
